<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>动画案例</title>
  <style>
    * {
      margin: 0 0;
    }

    .box {
      width: 200px;
      height: 200px;
      background-color: pink;
      position: relative;
      animation: move 5s infinite;

    }

    @keyframes move {
      0% {
        left: 0;
        top: 0;
      }

      25% {
        left: 500px;
        top: 0;
      }

      50% {
        left: 500px;
        top: 500px;
      }

      75% {
        left: 0;
        top: 500px;
      }

      100% {
        left: 0;
        top: 0;
      }
    }
  </style>
</head>

<body>
  <div class="box"></div>
</body>

</html>